package com.ssm.helong.shop.Dao;

import com.ssm.helong.shop.entity.GoodsAttribute;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface GoodsAttributeMapper {

    /**
     * 选择插入
     * @param goodsAttribute
     * @return
     */
    int insertSelective(GoodsAttribute goodsAttribute);

    /**
     * 根据主键查询商品
     * @param goodsId
     * @return
     */
    GoodsAttribute selectByPrimaryKey(Integer goodsId);

    /**
     * 根据主键修改
     * @param goodsAttribute
     * @return
     */
    int updateByPrimaryKeySelective(GoodsAttribute goodsAttribute);

    /**
     * 根据主键删除商品
     * @param goodsAttribute
     * @return
     */
    int deleteByPrimaryKey(GoodsAttribute goodsAttribute);

    /**
     * 批量修改上架下架状态
     * @param goodsIds
     * @param goodsSellStatus
     * @return
     */
    int batchUpdateSellStatus(@Param("goodsIds")Integer[] goodsIds,@Param("goodsSellStatus") Integer goodsSellStatus);
}
